<script>
	import {
		getLocation,
		setTabBarCity
	} from './common/common.js'
	import IMService from "lib/imservice.js"
	export default {
		onLaunch: async function() {
			console.log('====>onLaunch')
			await getLocation()
			setTabBarCity()
			let token = uni.getStorageSync('token');
			let user = uni.getStorageSync('user');
			if (token != '') {
				if (this.goEasy.getConnectionStatus() === 'disconnected') {
					getApp().globalData.imService = new IMService(this.goEasy, this.GoEasy);
					getApp().globalData.imService.connect(user);
				}
			}
		},
		onShow: function() {
			console.log('App Show')
		
		},
		onHide: function() {
			console.log('App Hide')

		},
		globalData: {
			city: {
				cityName: "北京",
				cityId: 398
			},
			user: {

			},
			imService: null,
			friend: {

			},
			authority:1

		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "uview-ui/index.scss";
	@import url("./static/style/chatInterface.css");
</style>
